<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="EventEmitter.js"></script>
</head>
<body>
    <script>
        const event = new EventEmitter()
        console.log(event)
        event.on('demo1',function (str){
            console.log('one'+str)
        })
        event.on('demo1',function (str){
            console.log('two'+str)
        })
        event.once('demo2',function (str){
                console.log('three'+str)
            }
        )
    </script>
</body>
</html>